
import 'package:flutter/material.dart';
import 'package:flutterlib/common/constants/constants.dart';
import 'package:flutterlib/common/net/dao_result.dart';
import 'package:flutterlib/common/net/retrofit/post_api.dart';
import 'package:flutterlib/common/style/quhui_style.dart';
import 'package:flutterlib/common/utils/navigator_utils.dart';
import 'package:flutterlib/common/utils/toast.dart';
import 'package:flutterlib/model/post/post_bean.dart';
import 'package:flutterlib/pages/post/post_list_widget_page.dart';
import 'package:flutterlib/widgets/bussiness/post/post_list_item.dart';
import 'package:flutterlib/widgets/bussiness/post/post_simple_list_item.dart';

class ReportNormalListWidgetPage extends PostListWidgetPage {
  final String name;
  final int interestId;
  final int type;

  ReportNormalListWidgetPage({this.name, this.interestId, this.type, Key key})
      : super(key: key);

  @override
  ReportNormalListWidgetPageState createState() => ReportNormalListWidgetPageState();
}

///页面 KeepAlive ，同时支持 动画Ticker
class ReportNormalListWidgetPageState extends PostListWidgetPageState<ReportNormalListWidgetPage>
    {

  getDataLogic(int page) async {
    print(page);

      var posts = await PostApi.builder().reportPageByUser(
          page - 1, 20, "createTime,desc", currentUserId);
      return new DataResult(posts.content, true);

  }

  Widget renderItem(index, post) {
    //提交
    // var post = pullLoadWidgetControl.dataList[index];
    return
         PostSimpleListItem(post, onPressed: () {
    },);
  }

  @override
  List<Widget> renderHeader(BuildContext context, bool innerBoxIsScrolled) {
    List<Widget> widgets = [];

    return widgets;
  }

}
